package routes

import (
	"fmt"
	"one-web/app/controller/webapi"

	"github.com/gin-gonic/gin"
)

type Route struct {
	Engine *gin.Engine
}

func InitRouter(r Route) { //套一层
	// GroupV1 := r.Engine.Group("/v1"){
	// 	GroupV1.GEt("/honme/index", controller.AddMember)
	// }

	fmt.Println("InitRouter start\n")
	r.user()
	r.index()
}

func (r *Route) user() {
	GroupV1 := r.Engine.Group("user")
	{
		GroupV1.Any("/", new(webapi.Indexcontroller).Run)

	}
}

func (r *Route) index() {
	r.Engine.Any("/", new(webapi.Indexcontroller).Run)
}
